package com.hyl.icon.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

@Service
public interface IconService {
    /**
     * 根据背景图片和logo图片，已经品牌名生成图标
     * @param backgroundFile
     * @param logoFile
     * @param brandName
     * @return
     */
    BufferedImage generateBrandImage(MultipartFile backgroundFile, MultipartFile logoFile, String brandName);

    String imageToBase64(BufferedImage image, String format);

    /**
     * 绘制带品牌名、电话、地址的图标
     * @param backgroundFile
     * @param logoFile
     * @param brandName
     * @param phone
     * @param address
     * @return
     */
    BufferedImage generateBrandImage(MultipartFile backgroundFile, MultipartFile logoFile, String brandName,String phone,String address);

    /**
     * 获取模版并且执行结果
     * @param backgroundFile
     * @param logoFile
     * @param brandName
     * @param phone
     * @param address
     * @return
     */
    BufferedImage getTemplateResult(MultipartFile backgroundFile, MultipartFile logoFile, String brandName, String phone, String address);
}
